import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 路由表
const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/')
  },

  {
    path: '/search',
    name:'search',
    component: () => import('@/views/search/')
  },
  {
    path: '/emsearch',
    name:'emsearch',
    component: () => import('@/views/emergency/search/')
  },
  {
    path: '/emcls/:clsname/:code',
    name:'emcls',

    component: () => import('@/views/emergency/emcls/'),
    props: true
  },
   //协同创新检索  
  {
    path: '/synersearch',
    name:'synersearch',
    component: () => import('@/views/synergy/search/')
  },


  {
    path: '/article',
    name: 'article',
    component: () => import('@/views/article'),
    // 将路由动态参数映射到组件的 props 中，更推荐这种做法
    props: true
  },
  {
    path: '/vuepdf/',
    name: 'vuepdf',
    component: () => import('@/views/vuepdf'),
    // 将路由动态参数映射到组件的 props 中，更推荐这种做法
    props: true
  },

  {
    path: '/vuepdf1/:tableName/:sysId/:fileName/:/title',
    name: 'vuepdf1',
    component: () => import('@/views/vuepdf/index1.vue'),
    // 将路由动态参数映射到组件的 props 中，更推荐这种做法
    props: true
  },
  {
    name: 'user-profile',
    path: '/user/profile',
    component: () => import('@/views/user-profile')
  }
  ,
  // {
  //   path: '/bookShow',
  //   name: 'bookShow',
  //   meta:{name:'应急管理'},
  //   component: () => import('@/views/journal/bookShow')
  // },

  {
    path: '/',
    component: () => import('@/views/layout/'),
    children: [
      {
        path: '', // 默认子路由
        name: 'home',
        meta:{name:'首页'},
        component: () => import('@/views/home/')
      },
      {
        path: '/emergency',
        name: 'emergency',
        meta:{name:'应急管理'},
        component: () => import('@/views/emergency/')
      },
      {
        path: '/synergy',
        name: 'synergy',
        meta:{name:'协同创新'},
        component: () => import('@/views/synergy/')
      },
      {
        path: '/syncls/:clsname/:code',
        name: 'syncls',
        meta:{name:'协同中央精神更多'},
        component: () => import('@/views/synergy/syncls'),
        props: true
        
        
      },
      {
        path: '/synDetails',
        name: 'synDetails',
        meta:{name:'协同详情'},
        component: () => import('@/views/synergy/synDetails')
      },
      {
        path: '/journal',
        name: 'journal',
        meta:{name:'期刊'},
        component: () => import('@/views/journal/'),
      },
      {
        path: '/open',
        name: 'open',
        meta:{name:'公开出版的更多'},
        component: () => import('@/views/journal/open')
      },
      {
        path: '/cnki',
        name: 'cnki',
        meta:{name:'公开出版的更多'},
        component: () => import('@/views/journal/cnki')
      },
      {
        path: '/Exhibition',
        name: 'Exhibition',
        meta:{name:'整刊展示'},
        component: () => import('@/views/journal/Exhibition')
      },
      {
        path: '/readDownload',
        name: 'readDownload',
        meta:{name:'党刊详情'},
        component: () => import('@/views/journal/readDownload')
      },
      {
        path: '/about',
        name: 'about',
        meta:{name:'关于'},
        component: () => import('@/views/journal/about')
      },
      {
        path: '/resourcesList',
        name: 'resourcesList',
        meta:{name:'党刊资源'},
        component: () => import('@/views/journal/resourcesList')
      },
      {
        path: '/bigData',
        name: 'bigData',
        meta:{name:'党刊大数据'},
        component: () => import('@/views/journal/bigData')
      },
      {
        path: '/expertPeople',
        name: 'expertPeople',
        meta:{name:'专家学者详情'},
        component: () => import('@/views/journal/expertPeople')
      },
      {
        path: '/notOpenbookDetails',
        name: 'notOpenbookDetails',
        meta:{name:'详情'},
        component: () => import('@/views/journal/notOpenbookDetails')
      },
      {
        path: '/expertList',
        name: 'expertList',
        meta:{name:'专家学者List'},
        component: () => import('@/views/journal/expertList')
      },
      {
        path: '/NotOpen',
        name: 'NotOpen',
        meta:{name:'非公开出版的更多'},
        component: () => import('@/views/journal/NotOpen')
      },
      {
        path: '/bookDetails',
        name: 'bookDetails',
        meta:{name:'期刊详情'},
        component: () => import('@/views/journal/bookDetails')
      },
      {
        path: '/my',
        name: 'my',
        component: () => import('@/views/my/')
      }

    ]
  },
  {
    path: '/homeSearch/:sText',
    name:'homeSearch',
    component: () => import('@/views/home/search'),
    props: true
  },
  {
    path: '/advSearch',
    name:'advSearch',
    component: () => import('@/views/home/advsearch'),
    props: true
  },
  {
    path: '/mylook/:clsname',
    name:'mylook',
    component: () => import('@/views/my/mylook/'),
    props: true
  },
  {
    path: '/register/',
    name:'register',
    component: () => import('@/views/login/register'),
    props: true
  },
]

const router = new VueRouter({
  routes
})

export default router

